package com.ushine.design.design.b_structural_type.g_proxy.c_example;

/**
 * 具体主题角色
 *
 * @author yls
 */
public class UserDAO implements AbstractuserDAO {

    @Override
    public Boolean finUserById(String userId) {
        if (userId.equalsIgnoreCase("张无忌")) {
            System.out.println("查询ID为：" + userId + "的用户信息成功！");
            return true;
        }
        System.out.println("查询ID为：" + userId + "的用户信息失败！");
        return false;
    }

    @Override
    public Boolean deleteUserById(String userId) {
        if (userId.equalsIgnoreCase("张无忌")) {
            System.out.println("删除ID为：" + userId + "的用户信息成功！");
            return true;
        }
        System.out.println("删除ID为：" + userId + "的用户信息失败！");
        return false;
    }

}
